//
//  RankManager.cpp
//  dot
//
//  Created by zz on 2019/6/21.
//

#include "RankManager.hpp"

RankManager * RankManager::Instance = NULL;

RankManager* RankManager::getInstance(){
    
    if(RankManager::Instance){
    
        RankManager::Instance = new RankManager();
        RankManager::Instance->init();
    }else{
        
        return RankManager::Instance;
    }
}
bool RankManager::init(){

    return true;
}
void RankManager::saveScore(char*key,int value){
    
    auto ud = UserDefault::getInstance();
    ud->setIntegerForKey(key,value);
}

int RankManager::getR(char* key){
    
    auto ud = UserDefault::getInstance();
    return ud->getIntegerForKey(key);
}
